#include <num_recognizer.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    if(argc!=3){
        printf("Usage: recognize mnit.onnx 3.png\n");
        return -1;
    }

    int ret = 0;
    int result =-1;
    Recognizer *recognizer;

    num_recognizer_init();

    num_recognizer_create(argv[1], &recognizer);

    if(ret = num_recognizer_recognize_png(recognizer, argv[2], &result)){
        printf("Failed to recognize\n");
        goto exit_main;
    }
    printf("%d\n",result);

exit_main:
    num_recognizer_delete(recognizer);
    return ret;

}